{extend name="base"}
{block name="content"}
		<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Menu/index')}">后台菜单</a></li>
			<li><a href="{:url('Menu/add')}">添加菜单</a></li>
			<li class="active"><a href="{:url('Menu/edit',['id'=>$list->id])}">编辑菜单</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form" action="">
			<input type="hidden" name="id" value="{$list->id}" />
			<fieldset>
				<div class="control-group">
					<label class="control-label">上级:</label>
					<div class="controls">
						<select name="parentid">
							<option value="0">作为一级菜单</option>
							{$categorys}
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">名称:</label>
					<div class="controls">
						<input type="text" name="name" value="{$list->name}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">模块:</label>
					<div class="controls">
						<input type="text" name="module" id="module" value="{$list->module}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">控制器:</label>
					<div class="controls">
						<input type="text" name="controller" id="controller" value="{$list->controller}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">操作:</label>
					<div class="controls">
						<input type="text" name="action" id="action" value="{$list->action}">
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">额外参数:</label>
					<div class="controls">
						<input type="text" name="urlext" value="{$list->urlext}">
						例:id=3&p=k
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">图标:</label>
					<div class="controls">
						<input type="text" name="icon" id="icon" value="{$list->icon}">&nbsp;&nbsp;<a href="http://fontawesome.dashgame.com/" target="_blank">Font Awesome图标参考</a>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">备注:</label>
					<div class="controls">
						<textarea name="remark" rows="5" cols="57" style="width: 500px;">{$list->remark}</textarea>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">显示:</label>
					<div class="controls">
						<select name="display">
							<option value="1" {if condition="$list->display eq 1"}selected{/if}>显示</option>
							<option value="0" {if condition="$list->display eq 0"}selected{/if}>隐藏</option>
						</select>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">类型:</label>
					<div class="controls">
						<select name="type">
							<option value="1" {if condition="$list->type eq 1"}selected{/if}>权限认证+菜单</option>
							<option value="0" {if condition="$list->type eq 0"}selected{/if}>只作为菜单</option>
						</select>
						注意：“权限认证+菜单”表示加入后台权限管理，纯碎是菜单项请不要选择此项。
					</div>
				</div>
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">确定操作</button>
				<a class="btn" href="{:url('Menu/index')}">返回</a>
			</div>
		</form>
	</div>
		<script src="__THEMES__/js/common.js"></script>
{/block}